package com.example.sxt_practise.GOF23.command;

/**
 * 具体命令类
 * @author gaofeng
 * @date 2022年05月24日 8:21
 */
public class ConcreteCommand implements Command{
    private final Receiver receiver ;

    public ConcreteCommand(Receiver receiver) {
        this.receiver = receiver;
    }

    @Override
    public void execute() {
        System.out.println("方法执行前处理");
        receiver.action();
        System.out.println("方法执行后处理");
    }
}
